import React, { FC, useEffect, useState } from 'react';
import styles from './BasicLayout.less';
import NavComponent from '@/components/NavComponent/NavComponent';
import MenuComponent from '@/components/MenuComponent/MenuComponent';
import FooterComponent from '@/components/FooterComponent/FooterComponent';

interface BasicLayoutProps {}

const BasicLayout: FC<BasicLayoutProps> = (props) => {
  const { children } = props;

  useEffect(() => {
    console.log('BasicLayout 组件挂载完毕!');
  }, []);

  console.log('BasicLayout 组件render!');
  return (
    <div className={styles.container}>
      {/*导航菜单*/}
      <NavComponent />
      {/*主菜单*/}
      <MenuComponent />
      <div className="main">{children}</div>
      <FooterComponent />
    </div>
  );
};

export default BasicLayout;
